#ifdef WX_PRECOMP
#include "wx_pch.h"
#else
#include <wx/wx.h>
#endif //WX_PRECOMP

#include "component_item.h"

ComponentItem::ComponentItem()
{
  Clear();
}

void ComponentItem::Clear()
{
  ID = 0;
  Type = TYPE_UNKNOW;
  ChassisClass = 0;
  RequredTehnLevel = 0;
  CostMain = CostSecond = CostMoney = CostPeople = BuildSpeed = SupportMain = SupportSecond = ExpensePriceGrow = 0.0;
  IsMilitary = false;
  HitPoints = LaserDefence = RocketDefence = 0.0;
  LaserDamage = LaserAttack = RocketDamage = RocketAttack = 0.0;
  LaserNumber = RocketNumber = 0;
  Weight = MaxWeight = 0.0;
  Motivator = Fuel = 0.0;
  CellsFront = CellsSide = CellsStern = CellsTransport = CellsExternal = CellsSpecial = 0;
  TransportCapacity = CarrierCapacity = RequredCellPosition = 0;

  BonusHitPoints = BonusLaserDefence = BonusRocketDefence = BonusLaserDamage = BonusRocketDamage = 0.0;
  BonusLaserAttack = BonusRocketAttack = BonusSpeed = BonusDistance = BonusInvisible = BonusDetect = BonusSupport  = 0.0;
  ScanStrength = DetectRange = StealthLevel = 0.0;
}

bool ComponentItem::IsOk() const
{
  return ID > 0;
}
